<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>、
       *{
           margin: 0;
           padding: 0;
       }
        .w{
        width: 1226px;
        margin: 0 auto;
    }
    body{
        box-sizing: border-box;
        background-color: #ebebeb;
    }
    li{
        list-style: none;
    }
    .head{
        height: 50px;
        /* background-color: pink; */
        display: flex;
        justify-content: space-between;
    }
    .tx{
        display: flex;
        justify-content: space-between;
        margin-right: 10px;
    }
    .tx li{
        text-align: center;
        cursor: pointer;
        
    }
    .con{
        height: 614px;
        display: flex;
        justify-content: space-between;
    }
    .con1{
        height: 100%;
        width: 234px;
        /* background-color: rgb(147, 147, 253); */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .con1 img{
        width: 234px;
        height: 300px;
        transition: all 0.6s;
    }
    .con1 img:hover{
        transform: translateY(-2px);
       box-shadow: 0 0px 10px #b0b0b0;
    }
    .one{
        height: 100%;
        width: 992px;
        overflow: hidden;
    }
    .hezi{
        margin-left: 14px;
        height: 100%;
        width: 992px;
        /* background-color: rgb(154, 255, 154); */
       
    }
    .box1{
        
        width: 234px;
        height: 300px;
        /* background-color: yellow; */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: all 0.2s ease;
        background-color: #fff;
        
      
    }
    .box2{
        width: 234px;
        height: 300px;
        background-color: #ebebeb;
        display: flex;
        flex-direction: column;
        /* justify-content: center; */
        align-items: center;
        transition: all 0.2s ease;
        justify-content: space-between;
        /* background-color: #fff; */
        
    }
    .box-yy{
           background-color: #fff;
        width: 234px;
        height: 143px;
        /* background-color: rgb(149, 47, 245); */
        transition: all 0.2s ease;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .box-yy img{
        width: 80px;
        height: 80px;
    }
    .box1:hover{
        transform: translateY(-2px);
        box-shadow: 0 0px 10px #b0b0b0;
    }
    .box-yy:hover{
        transform: translateY(-2px);
        box-shadow: 0 0px 10px #b0b0b0;
    }
    .con2 {
        /* display: inline-block; */
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;

    }
    .con2 div span{
        margin-top: 5px;
    }
    .box1 img{
       width: 160px;
       height: 160px;
    }
    /* .hezi1{
        display: none;
    } */
    /* .hezi2{
        display: none;
    }
    .hezi3{
        display: none;
    } */
    .ora{
       color: orange;
       border-bottom: 2px solid orange;
    }
    .xhz{
      width: 45px;
      height: 30px;
    }
    </style>
    
</head>
<body>
    <div class="head w">
        <ul class="tt">
            <li>智能</li>
        </ul>
        <ul class="tx">
            <div class="xhz"><li class="lis1">热门</li></div>
            <div class="xhz"><li class="lis2">安防</li></div>
            <div class="xhz"><li class="lis3">出行</li></div>
            
         
            
        </ul>
    </div>
    <div class="con w">
        <div class="con1">
            <div><img src="1.jpg" alt=""></div>
            <div><img src="2.jpg" alt=""></div>
        </div>
       <div class="one">
        <div class="con2 hezi">
            <div class="box1"><img src="3.jpg" alt=""><span>小米小爱音响play</span><span>听音乐，语音遥控家电</span><span>199元</span></div>
            <div class="box1"><img src="3.jpg" alt=""><span>小米小爱音响play</span><span>听音乐，语音遥控家电</span><span>199元</span></div>
            <div class="box1"><img src="3.jpg" alt=""><span>小米小爱音响play</span><span>听音乐，语音遥控家电</span><span>199元</span></div>
            <div class="box1"><img src="3.jpg" alt=""><span>小米小爱音响play</span><span>听音乐，语音遥控家电</span><span>199元</span></div>
            <div class="box1"><img src="3.jpg" alt=""><span>小米小爱音响play</span><span>听音乐，语音遥控家电</span><span>199元</span></div>
            <div class="box1"><img src="3.jpg" alt=""><span>小米小爱音响play</span><span>听音乐，语音遥控家电</span><span>199元</span></div>
            <div class="box1"><img src="3.jpg" alt=""><span>小米小爱音响play</span><span>听音乐，语音遥控家电</span><span>199元</span></div>
            <div class="box2">
                <div class="box-yy"><span>米家电烤箱</span><img src="4.jpg" alt=""></div>
                <div class="box-yy"><span>米家电烤箱</span><img src="4.jpg" alt=""></div>
            </div>
        </div>
        <div class="con2 hezi">
            <div class="box1"><img src="5.jpg" alt=""><span>小米智能门锁 标准锁体 碳素黑</span><span>听音乐，语音遥控家电</span><span>99元</span></div>
            <div class="box1"><img src="5.jpg" alt=""><span>小米智能门锁 标准锁体 碳素黑</span><span>听音乐，语音遥控家电</span><span>99元</span></div>
            <div class="box1"><img src="5.jpg" alt=""><span>小米智能门锁 标准锁体 碳素黑</span><span>听音乐，语音遥控家电</span><span>99元</span></div>
            <div class="box1"><img src="5.jpg" alt=""><span>小米智能门锁 标准锁体 碳素黑</span><span>听音乐，语音遥控家电</span><span>99元</span></div>
            <div class="box1"><img src="5.jpg" alt=""><span>小米智能门锁 标准锁体 碳素黑</span><span>听音乐，语音遥控家电</span><span>99元</span></div>
            <div class="box1"><img src="5.jpg" alt=""><span>小米智能门锁 标准锁体 碳素黑</span><span>听音乐，语音遥控家电</span><span>99元</span></div>
            <div class="box1"><img src="5.jpg" alt=""><span>小米智能门锁 标准锁体 碳素黑</span><span>听音乐，语音遥控家电</span><span>99元</span></div>
            <div class="box2">
                <div class="box-yy"><span>米家电烤箱</span><img src="4.jpg" alt=""></div>
                <div class="box-yy"><span>米家电烤箱</span><img src="4.jpg" alt=""></div>
            </div>
        </div>
        <div class="con2 hezi">
            <div class="box1"><img src="6.jpg" alt=""><span>米兔折叠婴儿推车</span><span>听音乐，语音遥控家电</span><span>19元</span></div>
            <div class="box1"><img src="6.jpg" alt=""><span>米兔折叠婴儿推车</span><span>听音乐，语音遥控家电</span><span>19元</span></div>
            <div class="box1"><img src="6.jpg" alt=""><span>米兔折叠婴儿推车</span><span>听音乐，语音遥控家电</span><span>19元</span></div>
            <div class="box1"><img src="6.jpg" alt=""><span>米兔折叠婴儿推车</span><span>听音乐，语音遥控家电</span><span>19元</span></div>
            <div class="box1"><img src="6.jpg" alt=""><span>米兔折叠婴儿推车</span><span>听音乐，语音遥控家电</span><span>19元</span></div>
            <div class="box1"><img src="6.jpg" alt=""><span>米兔折叠婴儿推车</span><span>听音乐，语音遥控家电</span><span>19元</span></div>
            <div class="box1"><img src="6.jpg" alt=""><span>米兔折叠婴儿推车</span><span>听音乐，语音遥控家电</span><span>19元</span></div>
            <div class="box2">
                <div class="box-yy"><span>米家电烤箱</span><img src="4.jpg" alt=""></div>
                <div class="box-yy"><span>米家电烤箱</span><img src="4.jpg" alt=""></div>
            </div>
        </div>
       </div>
    </div>
    <script>
        var hezi = document.querySelectorAll('.hezi');
        var xhz = document.querySelectorAll('.xhz');
      
        for(var i=0;i<xhz.length;i++){
    xhz[i].setAttribute('index',i);
    xhz[i].onmouseover = function(){
        for(var i=0;i<xhz.length;i++){
            xhz[i].classList.remove('ora');
        }
        this.classList.add('ora');
        var index = this.getAttribute('index');
        for(var i=0;i<hezi.length;i++){
            hezi[i].style.display = 'none';
        }
        hezi[index].style.display = 'flex';
    }
}
    </script>
</body>
</html>